﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MainMaster.master" AutoEventWireup="true"
    CodeFile="registerstep1.aspx.cs" Inherits="registerstep1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CssLinkHolder" runat="Server">
    <link href="themes/css/formValidator.css" type="text/css" rel="Stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" runat="Server">
    <div class="reg_step">
        <ul>
            <li class="current"><span>1</span> Complete Account Information</li>
            <li><span>2</span> Complete Company Information</li>
            <li class="last"><span>3</span> Success</li>
        </ul>
    </div>
    <div class="reg_left">
        <fieldset class="regBox first">
            <legend>Select your Business Location &amp; Account Type</legend>
            <div class="basicinfo">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="25%" height="30" align="right">
                            <span class="text_red">* </span><strong>Business Location:&nbsp;</strong>&nbsp;
                        </td>
                        <td width="75%">
                            <select name="dropBussinessLoc" id="dropBussinessLoc" style="width: 310px;">
                                <option value="-1" selected="selected">Please Select</option>
                                <asp:Repeater ID="rptLocation" runat="server">
                                    <ItemTemplate>
                                        <option value="<%#Eval("CountryId") %>">
                                            <%#Eval("Name")%></option>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <span class="text_red">* </span><strong>Please select a role:&nbsp;</strong>&nbsp;
                        </td>
                        <td>
                            <label>
                                <input type="radio" name="rbtnMemberType" id="rbtnSeller" value="0">
                                I'm Supplier</label>&nbsp;&nbsp;&nbsp;&nbsp;
                            <label>
                                <input type="radio" name="rbtnMemberType" id="rbtnBuyer" value="1000">
                                I'm Buyer
                            </label>
                            <div id="rbtnSellerTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </fieldset>
        <fieldset class="regBox">
            <legend>Enter your Email Address &amp; Create a Password</legend>
            <div class="basicinfo">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="25%" height="30" align="right">
                            <span class="text_red">* </span><strong>Member ID:&nbsp;</strong>&nbsp;
                        </td>
                        <td width="75%">
                            <input type="text" name="txtUserName" id="txtUserName" placeholder="Member ID" class="userinput">
                            <div id="txtUserNameTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <span class="text_red">* </span><strong>Email:&nbsp;</strong>&nbsp;
                        </td>
                        <td>
                            <label>
                                <input type="text" name="txtEmail" id="txtEmail" placeholder="Email" class="userinput">
                            </label>
                            <div id="txtEmailTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <span class="text_red">* </span><strong>Create Password:</strong>&nbsp;&nbsp;
                        </td>
                        <td>
                            <label>
                                <input type="password" name="txtPwd" id="txtPwd" placeholder="Create Password" class="userinput">
                            </label>
                            <div id="txtPwdTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <span class="text_red">* </span><strong>Re-enter Password:</strong>&nbsp;&nbsp;
                        </td>
                        <td>
                            <label>
                                <input type="password" name="txtReenterPwd" id="txtReenterPwd" placeholder="Re-enter Password"
                                    class="userinput">
                            </label>
                            <div id="txtReenterPwdTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </fieldset>
        <fieldset class="regBox">
            <legend>Enter your Contact Information </legend>
            <div class="basicinfo">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="25%" height="30" align="right">
                            <span class="text_red">* </span><strong>Full Name:&nbsp;</strong>&nbsp;
                        </td>
                        <td width="75%">
                            <input name="txtFirstName" type="text" class="userinput" id="txtFirstName" style="width: 154px;"
                                placeholder="First Name">
                            <input name="txtLastName" type="text" class="userinput" id="txtLastName" style="width: 154px;"
                                placeholder="Last Name">
                            <div id="txtFirstNameTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <span class="text_red">* </span><strong>Company Name:</strong>&nbsp;&nbsp;
                        </td>
                        <td>
                            <input type="text" name="txtCompanyName" placeholder="Company Name" id="txtCompanyName"
                                class="userinput">
                            <div id="txtCompanyNameTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <span class="text_red">* </span><strong>公司中文名:</strong>&nbsp;
                        </td>
                        <td>
                            <label>
                                <input type="text" name="txtCNCompany" placeholder="公司中文名" id="txtCNCompany" class="userinput">
                            </label>
                            <div id="txtCNCompanyTip" style="width: 220px;">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <strong>Tel:</strong>&nbsp;&nbsp;
                        </td>
                        <td>
                            <input type="text" name="txtTel1" id="txtTel1" placeholder="86" class="userinput"
                                style="width: 52px">
                            -
                            <input type="text" name="txtTel2" id="txtTel2" placeholder="021" class="userinput"
                                style="width: 52px">
                            -
                            <input type="text" name="txtTel3" id="txtTel3" placeholder="12345678" class="userinput"
                                style="width: 182px">
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">
                            <span class="text_red">* </span><strong>Verification Code:</strong>&nbsp;&nbsp;
                        </td>
                        <td>
                            <label>
                                <input type="text" name="txtCode" placeholder="Verification" id="txtCode" maxlength="4"
                                    class="userinput" style="width: 80px;">
                                <a href="javascript:void(0)" onclick="jQuery(this).find('img').attr('src','SecrityCode.ashx?time='+Math.random());"
                                    title="Get a new challenge" class="verificat">
                                    <img src="SecrityCode.ashx" width="60" align="absmiddle" height="20"></a>
                            </label>
                        </td>
                    </tr>
                </table>
            </div>
        </fieldset>
        <div class="reg_save">
            <input name="Submit" type="submit" id="btnSubmit" value="Create My Account" class="userleftsub regsub"></div>
    </div>
    <div class="reg_ad">
        <a href="#">
            <img src="../uploads/usercenter/reg/01.jpg" width="172" height="590"></a></div>
    <div class="oneclear" style="height: 20px;">
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="JsHolder" runat="Server">
    <script type="text/javascript" src="themes/scripts/formValidator-4.0.1.min.js"></script>
    <script type="text/javascript">
        jQuery(function () {
            jQuery.formValidator.initConfig({ submitButtonID: "btnSubmit", autoTip: false, debug: false, onSuccess: function () { return true; }, onError: function () { } });
            jQuery("#dropBussinessLoc").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 1, onError: "Bussiness Location is required" });
            jQuery(":radio[name='rbtnMemberType']").formValidator({ tipID: "rbtnSellerTip", onShow: "", onFocus: "", onCorrect: "" }).inputValidator({ min: 1, max: 1, onError: "Please select a role" });
            jQuery("#txtUserName").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 1, onError: "Member ID is required" })
            .ajaxValidator({
                dataType: "json",
                async: true,
                data: { cmd: 1000, st: Math.random() },
                url: "AjaxGet.ashx",
                success: function (data) {
                    if (data == 404) return true;
                    return false;
                },
                error: function (jqXHR, textStatus, errorThrown) { },
                onError: "Member ID exists, Please input member id",
                onWait: ""
            });
            jQuery("#txtEmail").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 1, onError: "Email is required" })
            .regexValidator({ regExp: "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", onError: "Email is not valid" });

            jQuery("#txtPwd").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 2, onError: "Create Password is required" });
            jQuery("#txtReenterPwd").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 2, onError: "Re-enter Password is required" })
            .compareValidator({ desID: "txtPwd", operateor: "=", onError: "Two password is not consistent" });
            jQuery("#txtFirstName").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 2, onError: "First Name is required" });
            jQuery("#txtLastName").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 2, onError: "Last Name is required" });
            jQuery("#txtCode").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 2, onError: "Verification Code is required" });
            jQuery("#txtCompanyName").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 2, onError: "Company Name is required" });
            jQuery("#txtCNCompany").formValidator({ onShow: " ", onFocus: " ", onCorrect: " " }).inputValidator({ min: 2, onError: "公司中文名是必填项" })
            .regexValidator({ regExp: "[\u4E00-\u9FFF]+", onError: "公司中文名必须包含中文" });
        });
    </script>
</asp:Content>
